﻿using LpbPrj.Client.Data;
using LpbPrj.Client.ViewModels;
using LpbPrj.Client.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace LpbPrj.Client.Module
{
    public class AScanTestModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            var regionManager = containerProvider.Resolve<IRegionManager>();
            regionManager.RequestNavigate("ContextRegion", nameof(IolMasterExamView));
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //此处注册单例之后，可以在任何地方获取实例
            containerRegistry.RegisterSingleton<IolMasterLiteExamViewModel>();

            containerRegistry.RegisterForNavigation<IolMasterExamView, IolMasterLiteExamViewModel>();

            containerRegistry.RegisterDialogWindow<DefaultDialogWindow>();
            containerRegistry.RegisterDialog<ConfirmView>();

        }
    }
}
